package book;

public class Book {
    private  String name ;
    private  String author ;

    private  int price;
    private  String type;

    private boolean out;

    public Book(String name, String author, int price, String type) {
        this.name = name;
        this.author = author;
        this.price = price;
        this.type = type;
    }

    public String getName() {

        return name;
    }

    public void setName(String name) {

        this.name = name;
    }

    public String getAuthor() {

        return author;
    }

    public void setAuthor(String author) {

        this.author = author;
    }

    public int getPrice() {

        return price;
    }

    public void setPrice(int price) {

        this.price = price;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {

        this.type = type;
    }

    public boolean isOut() {
        return out;
    }

    public void setOut(boolean out) {
        this.out = out;
    }

    @Override
    public String toString() {
        return "书库{" +
                "书名='" + name + '\'' +
                ", 作者='" + author + '\'' +
                ", 单价=" + price +
                ", 类型='" + type + '\'' +
                ((out== true) ? "  已经借出" : "  未被借出")+
                '}';
    }
}
